/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.book.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * book_category 书籍分类表Entity
 * @author 逗你玩
 * @version 2019-07-21
 */
@Table(name="book_category", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="category", attrName="category", label="分类"),
	}, orderBy="a.id DESC"
)
public class BookCategory extends DataEntity<BookCategory> {
	
	private static final long serialVersionUID = 1L;
	private String category;		// 分类
	private List<AllBook> allBookList = ListUtils.newArrayList();		// 子表列表
	
	public BookCategory() {
		this(null);
	}

	public BookCategory(String id){
		super(id);
	}
	
	@Length(min=0, max=256, message="分类长度不能超过 256 个字符")
	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}
	
	public List<AllBook> getAllBookList() {
		return allBookList;
	}

	public void setAllBookList(List<AllBook> allBookList) {
		this.allBookList = allBookList;
	}
	
}